message(STATUS "[nlua] libhv fetching ...")

find_program(PATCH_CMD patch REQUIRED)

FetchContent_Declare(
  libhv
  GIT_REPOSITORY https://github.com/ithewei/libhv.git
  GIT_TAG        15df63daed122c616ab1df9d6d1c6c7e855219e2
  # 打入补丁
  PATCH_COMMAND ${PATCH_CMD} -p1 < ${CMAKE_CURRENT_LIST_DIR}/patch/libhv_static_route.patch
  DOWNLOAD_NO_PROGRESS TRUE)

list(APPEND MY_LIBS libhv)
